import {resetProps,type PropsKey} from '../config/componentsProps'

type Mixin = {
	options?:{
		virtualHost:boolean
	},
	defaultPropsKey?:PropsKey,
	unmounted:() => void,
}

const mixin:Mixin = {
	// #ifdef MP-WEIXIN
	// 将自定义节点设置成虚拟的，更加接近Vue组件的表现，能更好的使用e-flex属性
	options: {
	  virtualHost: true,
	},
	// #endif
	unmounted () {
		  if(this.defaultPropsKey){
			  resetProps(this.defaultPropsKey)
		  }
	}
}

export default mixin;
